﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B303Langf.Parser.AST
{
   public abstract class TypeDenoter : AST
   {
      public TypeDenoter()
      {

      }

      public abstract ArrayIndexer ArrayIndexer
      {
         get;
      }

      public abstract bool IsArray
      {
         get;
      }

      public virtual int Size
      {
         get
         {
            return 1;
         }
      }

      public abstract TypeDenoter WithoutArray();

      public override int GetHashCode()
      {
         return GetType().GetHashCode();
      }

      public override bool Equals( object obj )
      {
         if( obj != null && obj.GetType() == GetType() )
         {
            return true;
         }
         return false;
      }
   }
}
